package com.jumi.microservice.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单-预售转真实操作记录
 * </p>
 *
 * @author liuz
 * @since 2020-10-21
 */
@TableName("order_stock_log")
@ApiModel(value="OrderStockLog对象", description="订单-预售转真实操作记录")
public class OrderStockLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "商品spuid")
    private Long spuId;

    @ApiModelProperty(value = "商品名")
    private String spuName;

    @ApiModelProperty(value = "添加库存数量")
    private Integer addStockNum;

    @ApiModelProperty(value = "操作行为")
    private String operation;

    @ApiModelProperty(value = "操作人")
    private String operationUser;

    @ApiModelProperty(value = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operationTime;

    public OrderStockLog() {
    }

    public OrderStockLog(Long spuid, String spuName, Integer addStockNum, String operationUser) {
        this.spuId = spuid;
        this.spuName = spuName;
        this.addStockNum = addStockNum;
        this.operationUser = operationUser;

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public String getSpuName() {
        return spuName;
    }

    public void setSpuName(String spuName) {
        this.spuName = spuName;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getOperationUser() {
        return operationUser;
    }

    public void setOperationUser(String operationUser) {
        this.operationUser = operationUser;
    }

    public LocalDateTime getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(LocalDateTime operationTime) {
        this.operationTime = operationTime;
    }

    public Integer getAddStockNum() {
        return addStockNum;
    }

    public void setAddStockNum(Integer addStockNum) {
        this.addStockNum = addStockNum;
    }
}
